#ifndef PRELISTWID_H
#define PRELISTWID_H


#include <QListWidget>
#include <QTreeWidgetItem>
#include <QListWidgetItem>

class PreListWid : public QListWidget
{
    Q_OBJECT
signals:
    void SigUpSelectShow(QString);
public:
    explicit PreListWid(QWidget *parent = nullptr);
public slots:
    void SlotUpPreList(QTreeWidgetItem *tree_item);
    void SlotUpSelect(QTreeWidgetItem *tree_item);
private:
    int _global;
    int _last_index;//预览条最右边item的索引。
    void AddListItem(const QString &path);
    QPoint _pos_origin;//在其父窗口的位置
    QMap<QString,QListWidgetItem*> _set_items;
private slots:
    void SlotItemPressed(QListWidgetItem *);

};

#endif // PRELISTWID_H
